#version 400
layout (location = 0) in vec3 VertexPosition;
layout (location = 1) in vec2 tex;
layout (location = 2) in vec3 VertexNormal;

out vec3 Position;
out vec3 Normal;
uniform mat3 NormalMatrix;
uniform mat4 project_matrix;
uniform mat4 view_matrix;
uniform mat4 model_matrix;
//uniform mat4 MVP;

void main()
{
    mat4 ModelViewMatrix = view_matrix*model_matrix;
    Normal = normalize( NormalMatrix * VertexNormal);
    Position = vec3( ModelViewMatrix * vec4(VertexPosition,1.0));
    gl_Position = project_matrix * view_matrix * model_matrix * vec4(VertexPosition,1.0);
}
